package com.moli.iov.sys.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 * 数据库连接池配置
 * </p>
 *
 * @author zql
 * @since 2019/9/4 11:25
 */
@Configuration
@ConditionalOnClass(value = {DruidDataSource.class})
public class DruidConfig {

  @Bean
  @ConfigurationProperties(prefix = "spring.datasource.druid")
  public DruidDataSource getDruidDataSource(){
    return new DruidDataSource();
  }

}
